A graphics system is sometimes used for performing a process of multiple drawing in which identical figures are drawn offset by a very short distance. A typical example of this is illustrated in FIG. 9, in which the shadow of a two-dimensional figure is expressed; it is often employed to draw maps for, for example, car navigation systems and the like.
Here, a drawing method by which the shadow of a two-dimensional figure is expressed, as in FIG. 9, will be explained by referring to FIG. 10. As illustrated in FIG. 10, a drawing mechanism 51 in a graphics system draws, onto a stencil buffer 52, a result of determination of whether or not a pixel is included in the target figure (masking determination result) (step 1). Specifically, the pixels that are included only in the figure are filled in. A figure 53 made of the filled-in pixels is also referred to as a stencil mask figure. Next, the stencil buffer 52 is referred to, and a main body 54 of the figure and a shadow 55 of the figure are drawn onto a frame buffer 56 while taking into consideration the positional relationship between the pixels (step 2).
A stencil buffer is a buffer for storing information representing whether permission to draw figures, in units of pixels, should be given. Drawing methods in which stencil buffers are used have spread widely as one of the methods of drawing complicated shapes having concavities.
However, in this type of drawing method, stencil buffers and frame buffers (resolution in a screen) are limited in size, and accordingly, a clipping process is performed in order to prevent the drawing of pixels in a place outside of the boundaries. However, when the shadow of a figure on a clipping boundary is drawn offset onto a frame buffer while referring to a stencil buffer, the clipped edge shifts inwardly in the screen so that a shadow 57, which is partially lacking as illustrated in FIG. 11, is generated.
When a frame buffer size is not smaller than the screen size, an area is provided to a frame buffer 58 as a margin for offsetting the shadow so that a frame buffer size 60 (this serves also as a clipping frame size) greater than an screen size 59 is secured, and thereby a main body 64 and a shadow 65 of the figure can be correctly drawn with the margin pushed out of the screen. By this method, the problem can be solved on the surface. Note that, in FIG. 12, the frame drawn by the dashed line in the stencil buffer 62 onto which a stencil mask figure 61 has been drawn represents a stencil buffer size 63 (this is also the clipping frame size), and the frame drawn by the solid line represents the screen size 59.
However, when a figure is to be drawn only in a partial area 67 that is smaller than a screen size 66 as illustrated in FIG. 13, the clipping area (the area in a clipping frame 68) is entirely within the screen so that unnecessary part prepared as a margin is drawn and unnecessary pieces 69 are drawn, and this makes it impossible to use the above kind of drawing methods. Note that the frame drawn by the solid line represents the screen size 66. Also, on a frame buffer 73 of a frame buffer size 72, in which a main body 70 and a shadow 71 of the figure are drawn, the frame drawn by the dashed-dotted line 67 and the frame drawn by the dashed line 68 respectively represent a partial area (also referred to as a window size) and the clipping frame size.
Besides the graphics systems as explained above, for example, Patent Document 1 discloses a graphics system used as a game machine that performs a shadow creation process in a virtual three-dimensional space in a game. Patent Document 2 discloses a graphics system used as an information processing apparatus that performs a clipping process on figures having a prescribed width, such as line segments.
In view of the above problems, it is an object of the present invention to provide a graphics system and a drawing method thereof that can prevent the chipping of a portion of a figure and the drawing of unnecessary portions of a figure in the process of multiple drawing in which identical drawing subjects are drawn offset by a prescribed distance in a shadow expressing process for two-dimensional figures.    Patent Document 1:    Japanese Laid-open Patent Publication No. 2003-331314    Patent Document 2:    Japanese Laid-open Patent Publication No. 08-287265